/*
 * Create Author  : jinpeng.chen
 * Create Date    : 2016-11-22
 * Project        : spring-boot
 * File Name      : AsyncTaskService.java
 *
 * Copyright (c) 2010-2015 by Shanghai HanTao Information Co., Ltd.
 * All rights reserved.
 *
 */
package com.charles.spring.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * 功能描述:  <p>
 *
 * @author : jinpeng.chen <p>
 * @version 1.0 2016-11-22
 * @since spring-boot 1.0
 */
@Service
public class AsyncTaskService {
    @Async
    public void executeAsyncTask(Integer i) {
        System.out.println("async task1: " + i + ", thread: " + Thread.currentThread().getName());
    }

    @Async
    public void executeAsyncTask1(Integer i) {
        System.out.println("async task2: " + i + ", thread: " + Thread.currentThread().getName());
    }
}
